Hi all, |
Re: Attribute Auto-population The down side is that the code in the DXL Attribute is only executed if the DXL Attribute itself is visible in a View. So Views that display attributes that require auto population will also need to display the DXL Attribute. The DXL Attribute could conceivably be included in the default opening View so that it's executed on opening but users can override that with their own personal default opening view, and it's just generally advisable not to have DXL Attributes in the default opening View anyway. To avoid unexpected modifications being applied and "Attribute DXL Failed" errors being reported, the DXL code will need to be fairly robust, so think carefully about what the possible exception events are that need to be accounted for in the code - for example, perform an up front check to confirm that the attributes that will be auto populated do actually exist. Include a check that the user can write to the module (use canWrite(m)), this will avoid DXL errors being raised if the module is opened in Read-only or Shareable Edit mode (although in Shareable Edit mode, even when a user has locked a section for editing, the DXL Attribute will not execute as technically the user does not have write access to the whole module because canWrite(m) = false). Paul Miller Melbourne, Australia |
Re: Attribute Auto-population
I think a clean way of solving this is to have a DXL attribute which will display N/A for headings and the value of another manually set enumeration attribute in case of a requirement. For example (note that the 'robustness' code is missing from that example:
// attr_dxl_verification_method.dxl
string sType = probeAttr_(obj, "Requirement Type")
if (sType == "Requirement") {
string sValue = probeAttr_ (obj, "Manual Verification Method")
obj.attrDXLname = sValue
} else {
obj.attrDXLname = "N/A"
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Attribute Auto-population
Here are some ill-formed random thoughts.
-Louie |